const { DataTypes, Model } = require('sequelize');
const sequelize = require('../util/database');

const Article = sequelize.define(
  'articles',
  {
    title: {
      type: DataTypes.STRING,
      allowNull: false
    },
    description: {
      type: DataTypes.STRING,
      allowNull: false
    },
    content: {
      type: DataTypes.STRING,
      allowNull: false
    },
    userid: {
      type: DataTypes.INTEGER,
      allowNull: false
    }
  }
);

module.exports = Article;
